package leetcode.leetcode_3350;

import java.util.List;

class Solution {
    public int maxIncreasingSubarrays(List<Integer> nums) {
        int n =nums.size();
        int count = 0;
        int preCount = 0;
        int ans = 0;
        for (int i =0 ;i<n;i++) {
            count++;
            if (i == n - 1 || nums.get(i) >= nums.get(i + 1)) {
                ans  = Math.max(ans,Math.max(count/2,Math.min(count,preCount)));
                preCount = count;
                count = 0;
            }
        }
        return ans;
    }
}